package com.example.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * 用户通知阅读记录实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserNoticeRead {
    
    /**
     * 主键ID
     */
    private Long id;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 通知ID
     */
    private Long noticeId;
    
    /**
     * 阅读时间
     */
    private LocalDateTime readTime;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    /**
     * 构造方法
     */
    public UserNoticeRead(Long userId, Long noticeId) {
        this.userId = userId;
        this.noticeId = noticeId;
        this.readTime = LocalDateTime.now();
        this.createTime = LocalDateTime.now();
    }
}
